import config from './config.js'

export function add_dir_api(data) {
  const reconfig = {
    data: JSON.stringify(data),
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  }
  return this.$http.post(config.my_server.bs_url + config.my_server.api.add_dir, '', reconfig)
}
export function get_dir_api(data) {
  const reconfig = {
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  }
  return this.$http.get(config.my_server.bs_url + config.my_server.api.get_dir, data, reconfig)
}
export function add_file_api(data) {
  const reconfig = {
    data: JSON.stringify(data),
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  }
  return this.$http.post(config.my_server.bs_url + config.my_server.api.add_file, '', reconfig)
}
export function get_get_file(data) {
  const reconfig = {
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  }
  return this.$http.get(config.my_server.bs_url + config.my_server.api.get_file, data, reconfig)
}
export function get_nas(data) {
  const reconfig = {
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    },
    data: JSON.stringify(data)
  }
  return this.$http.post(config.my_server.bs_url + config.my_server.api.get_nas, '', reconfig)
}
export function dow_kuaishou_video(data) {
  const reconfig = {
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    },
    data: JSON.stringify(data)
  }
  return this.$http.post(config.my_server.bs_url + config.my_server.api.dow_kuaishou_video, '', reconfig)
}